<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="/Public/foundation/css/foundation.min.css">
	<script src="/Public/jquery.min.js"></script>
	<script src="/Public/foundation/js/foundation.min.js"></script>
	<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
	<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
</head>
<body>

	<div>
    <div class="medium-3 columns" style="margin-left:34%">
        <form action="<?php echo U('doLogin');?>" method="post" id="zz">
            <fieldset>
                <legend>登录界面</legend>
                <label>手机
                    <input type="text" name="mtel" required >
                </label>
				<label>邮箱
                    <input type="text" name="email"id='email'required>
                </label>
                <label>密码
                    <input type="password" name="pwd"required>
                </label>
				<label>
					<input type="text" name='prove'>
					<input type="button" onclick='getPwd()' value='获取验证码'>
					</label>
                <label>
                    <input type="radio" name="role" value="1">学生
                    <input type="radio" name="role" value="0">老师
                </label>
                <input type="submit" class="button tiny" value="登录">
            </fieldset>
        </form>
    </div>
</div>
<script>
var getPwd = function(){
	if(!$('#email').val())return;
	$.post("<?php echo U('getPwd');?>",{email:$('#email').val()},function(data){});
}
$().ready(function() {
    $("#zz").validate();
});
</script>
</body>
</html>